﻿<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="" xmlns:c="http://www.w3.org/1999/XSL/Transform">
<head>
<script src="../js/jquery.min.js" type="text/javascript"></script>
<script src="../js/func.js?v=1.0" type="text/javascript"></script>
<script src="../js/func.js?v=1.0" type="text/javascript"></script>
<script src="../js/jquery-ui-1.10.4.min.js" type="text/javascript"></script>
<script src="../js/jquery.serializejson.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
  <meta name="description" content="Modern admin is super flexible, powerful, clean &amp; modern responsive bootstrap 4 admin template with unlimited possibilities with bitcoin dashboard.">
  <meta name="keywords" content="admin template, modern admin template, dashboard template, flat admin template, responsive admin template, web app, crypto dashboard, bitcoin dashboard">
  <meta name="author" content="PIXINVENT">
  <title>中国网络安全审查与认证区块链平台-首页
  </title>
  <link rel="apple-touch-icon" href="../images/ico/apple-icon-120.png">
  <link rel="shortcut icon" type="image/x-icon" href="../images/ico/favicon.ico">
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Quicksand:300,400,500,700"
  rel="stylesheet">
  <link href="https://maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome.min.css"
  rel="stylesheet">
  <!-- BEGIN VENDOR CSS-->
  <link rel="stylesheet" type="text/css" href="../css/vendors.css">
  <!-- END VENDOR CSS-->
  <!-- BEGIN MODERN CSS-->
  <link rel="stylesheet" type="text/css" href="../css/app.css">
  <!-- END MODERN CSS-->
  <!-- BEGIN Page Level CSS-->
  <link rel="stylesheet" type="text/css" href="../css/core/menu/menu-types/vertical-menu.css">
  <link rel="stylesheet" type="text/css" href="../css/core/colors/palette-gradient.css">
  <link rel="stylesheet" type="text/css" href="../vendors/css/cryptocoins/cryptocoins.css">
  <!-- END Page Level CSS-->
  <!-- BEGIN Custom CSS-->
  <link rel="stylesheet" type="text/css" href="../css/style.css">
  <!-- END Custom CSS-->
  
  
  <!-- BEGIN VENDOR CSS-->
<link rel="stylesheet" type="text/css" href="../css/vendors.css">
<link rel="stylesheet" type="text/css" href="../vendors/css/tables/jsgrid/jsgrid-theme.min.css">
<link rel="stylesheet" type="text/css" href="../vendors/css/tables/jsgrid/jsgrid.min.css">
<!-- END VENDOR CSS-->
<!-- BEGIN MODERN CSS-->
<link rel="stylesheet" type="text/css" href="../css/app.css">
<!-- END MODERN CSS-->
<!-- BEGIN Page Level CSS-->
<link rel="stylesheet" type="text/css" href="../css/core/menu/menu-types/vertical-menu.css">
<link rel="stylesheet" type="text/css" href="../css/core/colors/palette-gradient.css">
<!-- END Page Level CSS-->
<!-- BEGIN Custom CSS-->
<link rel="stylesheet" type="text/css" href="../css/style.css">
<!-- END Custom CSS-->
</head>
<body class="vertical-layout vertical-menu 2-columns   menu-expanded fixed-navbar"
data-open="click" data-menu="vertical-menu" data-col="2-columns">
  <!-- fixed-top-->
  <nav class="header-navbar navbar-expand-md navbar navbar-with-menu navbar-without-dd-arrow fixed-top navbar-semi-light bg-info navbar-shadow2">
    <div class="navbar-wrapper">
      <div class="navbar-header">
        <ul class="nav navbar-nav flex-row">
          <li class="nav-item mobile-menu d-md-none mr-auto"><a class="nav-link nav-menu-main menu-toggle hidden-xs" href="#"><i class="ft-menu font-large-1"></i></a></li>
          <li class="nav-item">
            <a class="navbar-brand" href="index.html">
              <img class="brand-logo" alt="modern admin logo" src="../images/logo/logo.png">
              <h3 class="brand-text" style="color:#fff!important;font-size:16px;">质量认证区块链平台</h3>
            </a>
          </li>
          <li class="nav-item d-md-none">
            <a class="nav-link open-navbar-container" data-toggle="collapse" data-target="#navbar-mobile"><i class="la la-ellipsis-v"></i></a>
          </li>
        </ul>
      </div>
      <div class="navbar-container content">
        <div class="collapse navbar-collapse" id="navbar-mobile">
          <ul class="nav navbar-nav mr-auto float-left">
            <li class="nav-item d-none d-md-block"><a class="nav-link nav-menu-main menu-toggle hidden-xs" href="#"><i class="ft-menu"></i></a></li>
            <li class="nav-item d-none d-md-block"><a class="nav-link nav-link-expand" href="#"><i class="ficon ft-maximize"></i></a></li>
        
            <li class="nav-item nav-search"><a class="nav-link nav-link-search" href="search-details.html"><i class="ficon ft-search"></i></a>
              <div class="search-input">
                <input class="input" type="text" placeholder="Explore Modern...">
              </div>
            </li>
          </ul>
          <ul class="nav navbar-nav float-right">
            <li class="dropdown dropdown-user nav-item">
              <a class="dropdown-toggle nav-link dropdown-user-link" href="#" data-toggle="dropdown">
                <span class="mr-1">您好,
                  <span class="user-name text-bold-700" id="currentLogin">丁**</span>
                </span>
                <span class="avatar avatar-online">
                  <img src="../images/portrait/small/me.png" alt="avatar"><i></i></span>
              </a>
			  <script>
              var unitt=Cookies.get("unittype");
              var usert=Cookies.get("usertype");
              var out="";
              if(unitt=="1"){
                out=out+"认证机构";
              }
              else if(unitt=="2"){
                out=out+"检测检验机构";
              }
              else if(unitt=="3"){
                out=out+"政府监管机构";
              }
              out=out+"的";
              if(usert=="1"){
                out=out+"业务员";
              }
              else if(usert=="2"){
                out=out+"审核员";
              }else if(usert=="3"){
                out=out+"管理员";
              }


              $("#currentLogin").text(out);



            </script>
              <div class="dropdown-menu dropdown-menu-right"><a class="dropdown-item" href="topassword"><i class="ft-user"></i>更改密码</a>
                <a class="dropdown-item" href="#"><i class="ft-mail"></i> 个人信息</a>
                <a class="dropdown-item" href="#"><i class="ft-check-square"></i>个人信息</a>
                <a class="dropdown-item" href="#"><i class="ft-message-square"></i>个人信息</a>
                <div class="dropdown-divider"></div><a class="dropdown-item" href="#" onclick="logout()"><i class="ft-power"></i> 退 出</a>
              </div>
            </li>
			
            <script>
                var token=Cookies.get('token');
						function logout(){
		var data1=JSON.stringify({"peers":["peer0.org1.example.com","peer0.org2.example.com","peer0.org3.example.com"],"fcn":"userLogout","args":[""]});			
        $.ajax({
            dataType:"json",
            type:"post",
			contentType: 'application/json',
			beforeSend: function(xhr) { 
								xhr.setRequestHeader("Authorization", "Bearer "+token);  
							},
			crossDomain: true,
            url:"http://47.105.220.31:4000/channels/mychannel/chaincodes/mycc",
            data:data1,
            eache: false,
            success: function (data) {
				console.log(data);
				if(data.success==true){
					Cookies.set("token","");
					window.location="login-simple.html";
				}
            },
            error: function () {
                // alert("2333")
			//	console.log(11);
                return;
            }
        });
    
						
						}




					</script>
<!--            <li class="dropdown dropdown-notification nav-item">-->
<!--              <a class="nav-link nav-link-label" href="#" data-toggle="dropdown"><i class="ficon ft-bell"></i>-->
<!--                <span class="badge badge-pill badge-default badge-danger badge-default badge-up badge-glow">5</span>-->
<!--              </a>-->
<!--              <ul class="dropdown-menu dropdown-menu-media dropdown-menu-right">-->
<!--              <li class="dropdown-menu-header">-->
<!--                <h6 class="dropdown-header m-0"> <span class="grey darken-2">消息通知</span> </h6>-->
<!--                <span class="notification-tag badge badge-default badge-danger float-right m-0">5</span> </li>-->
<!--              <li class="scrollable-container media-list w-100"> <a href="javascript:void(0)">-->
<!--                <div class="media">-->
<!--                  <div class="media-left align-self-center" style="padding-right:0.4rem;"><i class="ft-file icon-bg-circle bg-cyan" style="font-size:16px; padding:0.4rem;font-weight:normal;"></i></div>-->
<!--                  <div class="media-body">-->
<!--                    <h6 class="media-heading">目前待审核的信息有5条</h6>-->
<!--                     </div>-->
<!--                </div>-->
<!--                </a> <a href="javascript:void(0)">-->
<!--                <div class="media">-->
<!--                  <div class="media-left align-self-center" style="padding-right:0.4rem;"><i class="ft-file icon-bg-circle bg-cyan" style="font-size:16px; padding:0.4rem;font-weight:normal;"></i></div>-->
<!--                  <div class="media-body">-->
<!--                    <h6 class="media-heading red darken-1">姜**下载了一条证书</h6>-->
<!--                    </div>-->
<!--                </div>-->
<!--                </a> <a href="javascript:void(0)">-->
<!--                <div class="media">-->
<!--                  <div class="media-left align-self-center" style="padding-right:0.4rem;"><i class="ft-file icon-bg-circle bg-cyan" style="font-size:16px; padding:0.4rem;font-weight:normal;"></i></div>-->
<!--                  <div class="media-body">-->
<!--                    <p class="notification-text font-small-3 text-muted">谭*下载了一条证书</p>-->
<!--                    <small>-->
<!--                    </small> </div>-->
<!--                </div>-->
<!--                </a> <a href="javascript:void(0)">-->
<!--                <div class="media">-->
<!--                  <div class="media-left align-self-center" style="padding-right:0.4rem;"><i class="ft-file icon-bg-circle bg-cyan" style="font-size:16px; padding:0.4rem;font-weight:normal;"></i></div>-->
<!--                  <div class="media-body">-->
<!--                    <h6 class="media-heading">张*更新了个人信息资料</h6>-->
<!--                   </div>-->
<!--                </div>-->
<!--                </a> <a href="javascript:void(0)">-->
<!--                <div class="media">-->
<!--                  <div class="media-left align-self-center" style="padding-right:0.4rem;"><i class="ft-file icon-bg-circle bg-cyan" style="font-size:16px; padding:0.4rem;font-weight:normal;"></i></div>-->
<!--                  <div class="media-body">-->
<!--                    <h6 class="media-heading">高*新注册了个人资料</h6>-->
<!--                   </div>-->
<!--                </div>-->
<!--                </a> </li>-->
<!--              <li class="dropdown-menu-footer" style="font-size:12px;"><a class="dropdown-item text-muted text-center" href="javascript:void(0)" style="padding-top:10px;">查看所有消息通知</a></li>-->
<!--            </ul>-->
<!--            </li>-->
            
          </ul>
        </div>
      </div>
    </div>
  </nav>
   <!-- menu start -->
<div class="main-menu menu-fixed menu-dark menu-accordion    menu-shadow " id="menu" data-scroll-to-active="true">
    <div class="main-menu-content">
        <ul class="navigation navigation-main" id="main-menu-navigation" data-menu="menu-navigation" style="font-family:microsoft yahei;">
            <li class="nav-item open" id="userRev"><a href="toUserReview"><i class="la la-home"></i><span class="menu-title" data-i18n="nav.dash.main">用户审核</span></a></li>
            <!-- <li class=" nav-item"><a href="#"><i class="la la-television"></i><span class="menu-title" data-i18n="nav.templates.main">用户维护</span></a> -->
            <!-- <ul class="menu-content">          -->
            <!-- <li><a class="menu-item" href="revise-password.html" data-i18n="">密码修改</a> </li> -->
            <!-- <li><a class="menu-item" href="recover-password.html" data-i18n="">忘记密码</a> </li> -->
            <!-- </ul> -->
            <!-- </li> -->

            <li class="nav-item"><a href="#"><i class="la la-columns"></i><span class="menu-title" data-i18n="nav.page_layouts.main">证书查询</span></a>
                <ul class="menu-content">
                    <li><a class="menu-item" href="Certificate_download.html" data-i18n="">综合查询</a> </li>
                    <li><a class="menu-item" href="search-details.html" data-i18n="">条件查询</a> </li>
                </ul>
            </li>
            <li class=" nav-item jianguanjigou"><a href="#"><i class="la la-navicon"></i><span class="menu-title" data-i18n="nav.navbars.main">数据审核</span></a>
                <ul class="menu-content">
                    <li class="has-sub"><a class="menu-item renzhengAndshenheyuan" href="#" data-i18n="nav.navbars.nav_light">认证数据审核</a>
                        <ul class="menu-content">
                            <li><a class="menu-item" href="checkUploadApplyDataList.html" data-i18n=""> 证书申请资料审核</a> </li>
                            <li><a class="menu-item" href="checkUploadFileDataList.html" data-i18n="">文件审核资料审核</a> </li>
                            <li><a class="menu-item" href="checkUploadOnsiteDataList.html" data-i18n="">现场审核资料审核</a> </li>
                            <li><a class="menu-item" href="checkUploadCertificateDataList.html" data-i18n="">证书数据审核</a> </li>
                        </ul>
                    </li>

                    <li class="has-sub"><a class="menu-item jianceAndshenheyuan" href="" data-i18n="">检测检验数据审核</a>
                        <ul class="menu-content">
                            <li><a class="menu-item" href="checkDataList.html?type=5" data-i18n=""> 检测检验审核</a> </li>
                            <li><a class="menu-item" href="checkDataList.html?type=6" data-i18n="">试运行数据审核</a> </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li class=" nav-item jianguanjigou"><a href="#"><i class="la la-navicon"></i><span class="menu-title" data-i18n="nav.navbars.main">数据上传</span></a>
                <ul class="menu-content">
                    <li class="has-sub"><a class="menu-item renzhengAndyewuyuan" href="#" data-i18n="nav.navbars.nav_light">认证数据上传</a>
                        <ul class="menu-content">
                            <li><a class="menu-item" href="upload_Certificate_Application.html" data-i18n=""> 证书申请资料上传</a> </li>
                            <li><a class="menu-item" href="upload_Document_audit_Application.html" data-i18n="">文件审核资料上传</a> </li>
                            <li><a class="menu-item" href="upload_Site_audit.html" data-i18n="">现场审核资料上传</a> </li>
                            <li><a class="menu-item" href="upload_Certificate_data.html" data-i18n="">证书数据上传</a> </li>
                        </ul>
                    </li>

                    <li class="has-sub"><a class="menu-item jianceAndyewuyuan" href="" data-i18n="">检测检验数据上传</a>
                        <ul class="menu-content">
                            <li><a class="menu-item" href="upload_Detection.html" data-i18n=""> 检测检验上传</a> </li>
                            <li><a class="menu-item" href="upload_test_run.html" data-i18n="">试运行数据上传</a> </li>
                        </ul>
                    </li>
                </ul>
            </li>

            <li class="nav-item"><a href="#"><i class="la la-header"></i><span class="menu-title" data-i18n="nav.page_headers.main">平台监控</span></a>
                <ul class="menu-content">
                    <li><a class="menu-item" href="point_monitoring.html" data-i18n="">区块链状态监控</a> </li>
                    <li><a class="menu-item" href="block_monitoring.html" data-i18n="">区块信息监控</a> </li>
                    <li><a class="menu-item" href="toInformationStatic" data-i18n="">交易信息实时监控</a> </li>
                </ul>
            </li>

        </ul>
    </div>
</div>
  <div class="app-content content">
    <div class="content-wrapper">
      <div class="content-header row">
      </div>
      <div class="content-body">
        <div id="crypto-stats-3" class="row">
          <!-- <div class="col-xl-3 col-12"> -->
            <!-- <div class="card crypto-card-3 pull-up"> -->
              <!-- <div class="card-content"> -->
                <!-- <div class="card-body pb-0"> -->
                  <!-- <div class="row"> -->
                    <!-- <div class="col-2"> -->
                      <!-- <h1><i class="cc BTC warning font-large-2" title="交易信息实时监控"></i></h1> -->
                    <!-- </div> -->
                    <!-- <div class="col-5 pl-2"> -->
                      <!-- <h4>交易信息实时监控</h4> -->
                      <!-- <h6 class="text-muted"></h6> -->
                    <!-- </div> -->
                    <!-- <div class="col-5 text-right"> -->
                      <!-- <h4>31%</h4> -->
                      <!-- <h6 class="success darken-4"></h6> -->
                    <!-- </div> -->
                  <!-- </div> -->
                <!-- </div> -->
                <!-- <div class="row"> -->
                  <!-- <div class="col-12"> -->
                    <!-- <canvas class="height-75"></canvas> -->
                  <!-- </div> -->
                <!-- </div> -->
              <!-- </div> -->
            <!-- </div> -->
          <!-- </div> -->
          <div onclick="toinfo()" class="col-xl-4 col-12">
            <div class="card crypto-card-3 pull-up">
              <div class="card-content">
                <div class="card-body pb-0">
                  <div class="row">
                    <div class="col-2">
                      <h1><i class="cc ETH blue-grey lighten-1 font-large-2" title="区块信息监控"></i></h1>
                    </div>
                    <div class="col-5 pl-2">
                      <h4 >交易信息统计</h4>
                      <h6 class="text-muted"></h6>
                    </div>
                    <div class="col-5 text-right">
                      <h4 id="block_monitor"></h4>
                      <h6 class="success darken-4"></h6>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-12">
                    <canvas id="btc-chartjs" class="height-75"></canvas>
                  </div>
                </div>
              </div>
            </div>
          </div>
            <script>
                function gotoblock(){
                    window.location.href="block_monitoring.html";
                }
            </script>
          <div class="col-xl-4 col-12" onclick="gotoblock()">
            <div class="card crypto-card-3 pull-up">
              <div class="card-content">
                <div class="card-body pb-0">
                  <div class="row">
                    <div class="col-2">
                      <h1><i class="cc XRP info font-large-2" title="节点状态监控"></i></h1>
                    </div>
                    <div class="col-5 pl-2">
                      <h4>节点状态监控</h4>
                      <h6 class="text-muted"></h6>
                    </div>
                    <div class="col-5 text-right">
                      <h4 id="point_monitor"></h4>
                      <h6 class="danger"></h6>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-12">
                    <canvas id="eth-chartjs" class="height-75"></canvas>
                  </div>
                </div>
              </div>
            </div>
          </div>
		  <div class="col-xl-4 col-12">
            <div class="card crypto-card-3 pull-up">
              <div class="card-content">
                <div class="card-body pb-0">
                  <div class="row">
                    <div class="col-2">
                      <h1><i class="cc BTC warning font-large-2" title="节点在线人数"></i></h1>
                    </div>
                    <div class="col-5 pl-2">
                      <h4>节点在线人数</h4>
                      <h6 class="text-muted"></h6>
                    </div>
                    <div class="col-5 text-right">
                      <h4 id="onlinenumber"></h4>
                      <h6 class="success darken-4"></h6>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-12">
                    <canvas id="xrp-chartjs" class="height-75"></canvas>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>  <div class="content-wrapper" style="padding-top:0;"> 
      
     
     
     
      <!-- Sorting scenario start -->
      <section id="sorting-scenario">
        <div class="row" id="xxxID">
          <div class="col-12" id="shenhe">
            <div class="card">
              <div class="card-header">
                <h4 class="card-title" style="margin:20px 0 0 20px;">已审核用户列表</h4>
                <a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
                <div class="heading-elements">
                  <ul class="list-inline mb-0">
                    <li><a data-action="collapse"><i class="ft-minus"></i></a></li>
                    <li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
                    <li><a data-action="expand"><i class="ft-maximize"></i></a></li>
                    <li><a data-action="close"><i class="ft-x"></i></a></li>
                  </ul>
                </div>
              </div>
              <div class="card-content collapse show">
                <div class="card-body card-dashboard "> 
                  <!-- <p>Sorting can be done not only with column header interaction,
                      but also with sort method.</p>--> 
                  
                  <!-- <div id="sorting-table" class="js-shorting"></div>-->
                  
                  <div id="" class="js-shorting jsgrid" style="position: relative; height: 400px; width: 100%;">
                    <div class="jsgrid-grid-header jsgrid-header-scrollbar">
                      <table class="jsgrid-table">
                        <tr class="jsgrid-header-row">
                          <th class="jsgrid-header-cell jsgrid-align-center" style="width: 80px;">机构编号</th>
                          <th class="jsgrid-header-cell jsgrid-align-center" style="width: 100px;">机构名称</th>
                          <th class="jsgrid-header-cell jsgrid-align-center" style="width: 100px;">姓名</th>
                          <th class="jsgrid-header-cell jsgrid-align-center" style="width: 100px;">身份证号</th>

                        </tr>
                       
                      </table>
                    </div>
                    <div class="jsgrid-grid-body" style="height: 363px;">
                      <table class="jsgrid-table" id="ban">
                        <tbody>
                          
                          
                           
                          
                        </tbody>
                      </table>
                    </div>
                    <div class="jsgrid-pager-container" style="display: none;"></div>
                    <div class="jsgrid-load-shader" style="display: none; position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px; z-index: 1000;"></div>
                    <div class="jsgrid-load-panel" style="display: none; position: absolute; top: 50%; left: 50%; z-index: 1000;">Please, wait...</div>
                  </div>
				  
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
      <!-- Sorting scenario end --> 
    </div>
  </div>
  <script>


    var onUserID = 0;

    $(function () {
      $.ajax({
        dataType:"json",
        type:"get",
        contentType: 'application/json',
        beforeSend: function(xhr) {
          xhr.setRequestHeader("Authorization", "Bearer "+token);
        },
        crossDomain: true,
        url:"getTransaData",
        data:{},
        eache: false,
        success: function (data) {
          console.log(data);
          $("#block_monitor").text(data.length);
        },
        error: function () {
          //	console.log(11);
          return;
        }
      });
    })

    $(function(){
      $.ajax({
        dataType:"json",
        type:"get",
        crossDomain: true,
        contentType: 'application/json',
        url:"getOKRevList",
        eache: false,
        success: function (data) {

          var usert=Cookies.get("usertype");
          if(usert=="3"){

            console.log(data);
            for(var i=0;i<data.length;i++){

              //      $("#ban").append(" <tr class='jsgrid-row'> <td class='jsgrid-cell jsgrid-align-center' style='width:50px;'>"+data[i].temp1+"</td><td class='jsgrid-cell jsgrid-align-center' style='width: 150px;'>"+data[i].temp1+"</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>"+data[i].temp1+"</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>"+data[i].temp1+"</td></tr> ");
              $("#ban").append(" <tr class='jsgrid-alt-row'><td class='jsgrid-cell jsgrid-align-center' style='width:80px;'>"+data[i].institutionNumber+"</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>"+data[i].institutionName+"</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>"+data[i].idCard.split(";")[1]+"</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>"+data[i].idCard.split(";")[0].replace(/^(.{6})(?:\d+)(.{4})$/, "$1********$2")+"</td>" );
            }

          }
          // else
          //   alert(usert)





        },
        error: function (id) {
         // console.log("111");

        }
      });
    });



    function toinfo() {
      window.location.href="toInformationStatic";

    }

						var token=Cookies.get('token');
						if(token==null||token==""){
							window.location.href="/login";
						}
						$(function(){
						//var data1={"peers":"peer0.org1.example.com","fcn":"queryAllUsers","args":[""]};
						$.ajax({
							dataType:"json",
							type:"get",
							crossDomain: true,
							contentType: 'application/json',
							url:"http://47.105.220.31:4000/channels/mychannel/chaincodes/mycc?peer=peer0.org1.example.com&fcn=queryAllUsers&args=['']",
							beforeSend: function(xhr) { 
								xhr.setRequestHeader("Authorization", "Bearer "+token);  
							},
							crossDomain: true,
							contentType: 'application/json',
							//data:data1,
							eache: false,
							success: function (data) {
									;
									//console.log("111");
									console.log(data);
									//alert(Cookies.get('loginname'));
									var count=0;
									 var obj = eval(data);
                              var usert=Cookies.get("usertype");
                              if(usert=="3") {
                                $(obj).each(function (index) {
                                  var val = obj[index];
                                  count++;
                                  if (Cookies.get('loginname') == "Admin" || (Cookies.get('unittype') == "1" && Cookies.get('usertype') == "2")) {
                                    var usertype = "";
                                    var unittype = "";
                                    if (val.Record.userType == "1") {
                                      usertype = "业务员";
                                    } else if (val.Record.userType == "2") {
                                      usertype = "审核员";
                                    }
                                    if (val.Record.unitType == "1") {
                                      unittype = "认证机构";
                                    } else if (val.Record.unitType == "2") {
                                      unittype = "检测检验机构";
                                    } else if (val.Record.unitType == "3") {
                                      unittype = "政府监管机构";
                                    }
                                    $("#ban").append(" <tr class='jsgrid-alt-row'> <td class='jsgrid-cell jsgrid-align-center' style='width:50px;'>" + val.Key + "</td><td class='jsgrid-cell jsgrid-align-center' style='width: 150px;'>" + val.Record.unitNo + "</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>" + val.Record.name + "</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>" + usertype + "</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'>" + unittype + "</td><td class='jsgrid-cell jsgrid-align-center' style='width: 100px;'> <a href='Request_details.html?id=" + val.Key + "'> <span class='badge badge-primary' style='padding:8px 8px;'>查看详情</span></a>&nbsp;&nbsp; </td></tr> ");


                                  }


                                });
                                 // $("#onlinenumber").text(count+"人");
                              }else{
                                  $(obj).each(function (index) {
                                      var val = obj[index];
                                      count++;

                                  });
                              }
                                //alert(usert)
								$("#onlinenumber").text(count+"人");
							},
							error: function () {
							//	console.log("111");
								
							}
							});
							
							
							$.ajax({
					async:false,
					dataType:'json',
					type:'GET',
					url:"http://47.105.220.31:4000/channels/mychannel?peer=peer0.org1.example.com",
					beforeSend: function(xhr) { 
								xhr.setRequestHeader("Authorization", "Bearer "+token);  
							},
					crossDomain: true,
					contentType: 'application/json',
					eache: false,
					success: function (data) {

						console.log("hei"+data);
						
						$("#point_monitor").text(data.height.low);
						window.blocknum=data.height.low;
						//console.log(typeof blocknum);
						Cookies.set('blocknum',window.blocknum-1);
						
					},
					error: function (data) {
					    console.log("error",data)

					}
				});
				var number=window.blocknum-1;
				$.ajax({
					//async:false,
					dataType:'json',
					type:'GET',
					url:"http://47.105.220.31:4000/channels/mychannel/blocks/"+number+"?peer=peer0.org2.example.com",
					beforeSend: function(xhr) { 
								xhr.setRequestHeader("Authorization", "Bearer "+token);  
							},
					crossDomain: true,
					contentType: 'application/json',
					eache: false,
					success: function (data1) {

						console.log(data1);
						//$("#block_monitor").text(data1.data.data.length);
						
					},
					error: function () {

					}
				});
				
						});
						
  </script>
  <!-- ////////////////////////////////////////////////////////////////////////////-->
  <footer class="footer footer-static footer-light navbar-border navbar-shadow">
    <p class="clearfix blue-grey lighten-2 text-sm-center mb-0 px-2">
      <span class="float-md-left d-block d-md-inline-block">Copyright &copy; 2019 <a class="text-bold-800 grey darken-2" href="index.html" target="_blank">中科启信 </a>, All rights reserved. </span>
    
    </p>
  </footer>
  <!-- BEGIN VENDOR JS-->
  <script src="../vendors/js/vendors.min.js" type="text/javascript"></script>
  <!-- BEGIN VENDOR JS-->
  <!-- BEGIN PAGE VENDOR JS-->
  <script src="../vendors/js/charts/chart.min.js" type="text/javascript"></script>
  <script src="../vendors/js/charts/echarts/echarts.js" type="text/javascript"></script>
  <!-- END PAGE VENDOR JS-->
  <!-- BEGIN MODERN JS-->
  <!-- <script src="../js/core/app-menu.js" type="text/javascript"></script> -->
  <!-- <script src="../js/core/app.js" type="text/javascript"></script> -->
  <!-- <script src="../js/scripts/customizer.js" type="text/javascript"></script> -->
  <!-- END MODERN JS-->
  <!-- BEGIN PAGE LEVEL JS-->

  <script src="../js/scripts/pages/dashboard-crypto.js" type="text/javascript"></script>
<script src="../js/core/app-menu.js" type="text/javascript"></script> 
<script src="../js/core/app.js" type="text/javascript"></script> 
<script src="../js/scripts/customizer.js" type="text/javascript"></script> 
<!-- END MODERN JS--> 
<!-- BEGIN PAGE LEVEL JS--> 
<script src="../js/scripts/tables/jsgrid/jsgrid.js" type="text/javascript"></script>
<script src="../js/editHtml.js" type="text/javascript"></script>
<!-- END PAGE LEVEL JS-->
</body>
</html>